package teach.aistar.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import teach.aistar.model.vo.Result;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/user")
public class MapController {

    @RequestMapping("/map")
    public String map(HttpServletRequest request)
    {

//        String mapDetail =request.getParameter("cityDetail");
//
//
//        request.setAttribute("cityDetail",mapDetail);
//
//        System.out.println("详细城市为:"+mapDetail);

        return "/map/ditu1";


    }

    @RequestMapping("/map/search")

    public String mapcity(HttpServletRequest request)
    {
        String location = request.getParameter("search");
//        String mapDetail =request.getParameter("cityDetail");
//
//
//        request.setAttribute("cityDetail",mapDetail);
//
//        System.out.println("详细城市为:"+mapDetail);
        System.out.println(location);
        request.setAttribute("location",location);

        return "/map/ditu1";


    }

    @RequestMapping("/chat")
    public String chat()
    {
        return "chat1";
    }

}
